import { getById } from '../../utils/goods'
// const app = getApp()
Page({
  data: {
    indicatorDots: true,
    autoplay: true,
    vertical: false,
    interval: 2000,
    duration: 500,
    webp: true,
    id: '',
    items: []
  },
  onLoad(option) {
    console.log('onload',option)
    this.id = option.id
   },
  onShow() {
    this.getItem()
  },
  async getItem () {
    let res = await getById(this.id, { platform: 'mini' })
    this.setData({
      items: res.data
    })
  },
  // 客服
  contact(msg) {
    console.log(msg)
  }
})